
import router from '../router/index';
router.beforeEach((to, from, next) => {
    let token = sessionStorage.getItem('token');
    if (to.meta.requiresAuth){
        if(token){
            next()
        }else{
            next({
                path:'/Login',
                query:{
                    redirect: to.fullpath
                }
            })
        }
    }else{
        next()
    }
  })